package com.bitBusy.manageyourriches.database.contactClasses;

import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;


public class PaymentReminder implements Parcelable
{

	private static final int DATASIZE = 10;
	private int myDay;
	private int myMonth;
	private int myYear;
	private int myHour;
	private int myMinute;
	private String myNote;
	private int myRecurrent;
	private int myMonthly;
	private String myEmail;
	private int myID;
	
	public PaymentReminder(int the_day, int the_month, int the_year, int the_hour, int the_minute, String the_note, int the_recurrent, 
			int the_monthly, String the_email, int the_id)
	{
		myDay = the_day;
		myMonth = the_month;
		myYear = the_year;
		myHour = the_hour;
		myMinute = the_minute;
		myNote = the_note;
		myRecurrent = the_recurrent;
		myMonthly = the_monthly;
		myEmail = the_email;
		myID = the_id;
	}
	
	public PaymentReminder(Parcel the_input)
	{
		String[] data = new String[DATASIZE];
		the_input.readStringArray(data);
		this.myDay = Integer.parseInt(data[0]);
		this.myMonth = Integer.parseInt(data[1]);
		this.myYear = Integer.parseInt(data[2]);
		this.myHour = Integer.parseInt(data[3]);
		this.myMinute = Integer.parseInt(data[4]);
		this.myNote = data[5];
		myRecurrent = Integer.parseInt(data[6]);
		myMonthly = Integer.parseInt(data[7]);
		myEmail = data[8];
		myID = Integer.parseInt(data[9]);
	}
	/**
	 * 
	 */
	public PaymentReminder() {
		// TODO Auto-generated constructor stub
	}

	public int getID()
	{
		return myID;
	}
	public void setID(int the_alarmID)
	{
		myID = the_alarmID;
	}
	public int getDay()
	{
		return myDay;
	}
	public void setDay(int the_day)
	{
		myDay = the_day;
	}
	
	public int getMonth()
	{
		return myMonth;
	}
	public void setMonth(int the_month)
	{
		 myMonth = the_month;
	}
	public int getYear()
	{
		return myYear;
	}
	public void setYear(int the_year)
	{
		 myYear = the_year;
	}
	public int getHour()
	{
		return myHour;
	}
	public void setHour(int the_hour)
	{
		myHour = the_hour;
	}
	public int getMinute()
	{
		return myMinute;
	}
	
	public void setMinute(int the_minute)
	{
		 myMinute = the_minute;
	}
	public String getNote()
	{
		return myNote;
	}
	public void setNote(String the_note)
	{
		myNote = the_note;
	}
	public int isRecurrent()
	{
		return myRecurrent;
	}
	public void setIsRecurrent(int the_value)
	{
		 myRecurrent = the_value;
	}
	public int isMonthly()
	{
		return myMonthly;
	}
	public void setIsMonthly(int the_value)
	{
		 myMonthly = the_value;
	}
	public String getEmail()
	{
		return myEmail;
	}
	public void setEmail(String the_email)
	{
		 myEmail = the_email;
	}
	/* (non-Javadoc)
	 * @see android.os.Parcelable#describeContents()
	 */
	@Override
	public int describeContents() {
		return 0;
	}

	/* (non-Javadoc)
	 * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int)
	 */
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeStringArray(new String[] {String.valueOf(myDay), String.valueOf(myMonth), String.valueOf(myYear), String.valueOf(myHour), 
				String.valueOf(myMinute), myNote, String.valueOf(myRecurrent), String.valueOf(myMonthly), myEmail, String.valueOf(myID)});
		}
	  public static final Parcelable.Creator<PaymentReminder> CREATOR = new Parcelable.Creator<PaymentReminder>() {
          public PaymentReminder createFromParcel(Parcel in) {
              return new PaymentReminder(in); 
          }

          public PaymentReminder[] newArray(int size) {
              return new PaymentReminder[size];
          }
      };


	/**
	 * @return
	 */
	public Context getContext() {
		// TODO Auto-generated method stub
		return null;
	}


	}
	

